package com.mkh.st.common.core.constant.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

@Getter
@AllArgsConstructor
public enum SexEnum {
	MEN(1, "男"),
	WOMEN(2, "女"),
	UNKNOWN(0, "未知");


	private Integer status;

	private String value;

	public static SexEnum get(Integer status){
		if (Objects.isNull(status)) {
			return null;
		}
		for (SexEnum sexEnum : SexEnum.values()){
			if (status.equals(sexEnum.status))  return sexEnum;
		}
		return null;
	}
}
